#include <stdio.h>
#include <memory.h>

int main( )
{
    int k, a, t, s;
    bool u[ 65 ];
    while ( scanf("%d", &k) != EOF )
    {
        memset( u, 1, sizeof( u ) );
        s = t = k % 65;
        a = 1;
        u[ t ] = false;
        while ( 1 )
        {
            if ( t == 47 )
            {
                printf("%d\n", a);
                break;
            }
            t = ( t + s ) % 65;
            a++;
            if ( !u[ t ] )
            {
                printf("no\n");
                break;
            }
            u[ t ] = true;
        }
    }
    return 0;
}
